#!/bin/bash

if [ -f XXXisold ]; then
  echo "gap4r5XXX is already older version, do not swap. Bye."
  exit 1
fi

kill `cat ../../rsyncd.pid`
sleep 3
mv gap4r5 swaptmp
mv gap4r5XXX gap4r5
mv swaptmp gap4r5XXX
(cd ../../;  ./startrsyncserver)
rm -f  XXXisnew 
touch XXXisold

